#First, here's what local $x really does: It saves the current value of the package variable $x in a safe place,
#and replaces it with a new value, or with undef if no new value was specified. It also arranges for the old value
#to be restored when control leaves the current block. The variables that it affects are package variables, which
#get local values. But package variables are always global, and a local package variable is no exception.

	#Result:
	#B can see the value of lo set by A.
	#B cannot see the value of m  set by A.
	
	$lo = 'global';
	$m  = 'global';
	A();

	sub A
	{
		local $lo = 'AAA';
		my $m = 'AAA';
		B();
	}

	sub B
	{
		print "B ", ( $lo eq 'AAA' ? 'can' : 'cannot' ),
		  " see the value of lo set by A.\n";

		print "B ", ( $m eq 'AAA' ? 'can' : 'cannot' ),
		  " see the value of m  set by A.\n";
	}
